package fr.labri.macchiato.framework.business.model.product;

import fr.labri.macchiato.framework.util.MObservable;
import fr.labri.macchiato.framework.util.MObserver;

/**
 * The interface for any product which can be placed in a cart. Products can be
 * instantiated via the {@link ProductFactory}
 * 
 * @see Article
 * @see Model
 * @see Offer
 * @author Paul SARRAUTE
 */
public interface Product {

	/**
	 * 
	 * @return the Product's name
	 */
	public String getName();

	/**
	 * Sets the name of the product
	 * 
	 * @param name
	 */
	public void setName(String name);
	
	
	/**
	 * 
	 * @return the Product's quantity
	 */
	public int getQuantity();

	/**
	 * Sets the quantity of the product
	 * 
	 * @param quantity
	 */
	public void setQuantity(int quantity);
	
	
	/**
	 * @see MObservable#addObserver(MObserver)
	 * @param o
	 */
	public void addObserver(MObserver o);
	
	/**
	 * @see MObservable#removeObserver(MObserver)
	 * @param o
	 */
	public void removeObserver(MObserver o);
	
	/**
	 * @see MObservable#notifyObservers()
	 */
	public void notifyObservers();
	
	/**
	 * @see MObservable#notifyObservers(Object)
	 * @param arg
	 */
	public void notifyObservers(Object arg);
}
